#include <iostream>
#include <vector>

using namespace std;


long long F(long long N, vector<long long>& cache){
    if(N == 1){
        return 1;
    }

    if (N == 2){
        return 2;
    }

    if (cache[N] != -1) {
        return cache[N];
    }

    long long res = F(N-1, cache) + F(N-2, cache);
    cache[N] = res;
    return res;
}


/**
 * https://www.luogu.com.cn/problem/P1255
 * 
 * TODO : 高精度
 */
int main() {
    long long N;
    cin >> N;

    vector<long long> cache(N+1, -1);
    cache[1] = 1;
    cache[2] = 2;
    
    cout << F(N, cache) << endl;

    return 0;
}
